#ifndef msg_mark_h
#define msg_mark_h

#ifdef GETDLL
#define DLLAPI __declspec(dllexport)
#else
#define DLLAPI __declspec(dllimport)
#endif

#ifdef __cplusplus
extern "C" {
#endif

	struct MarkMsg;

	// return NULL if failure.
	DLLAPI struct MarkMsg* MarkMsg_Init(const char* filename);

	DLLAPI void MarkMsg_Release(struct MarkMsg* obj);

	// import __FILE__ and __LINE__
#include <windows.h>
	DLLAPI void _MarkMsg_Now(struct MarkMsg* obj,
			const unsigned int code,
			const char* msg,
			const char* szFile,
			unsigned int uLine);
#define MarkMsg_Now(obj, code, msg) \
	_MarkMsg_Now(obj, code, msg, __FILE__, __LINE__)

#ifdef __cplusplus
}
#endif

#endif
